package top.zackyoung.springboot.entity.base;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author ZackYoung
 * @version 1.0
 * @description
 * @date 2021/5/16 10:04
 */
@MappedSuperclass
@Setter
@Getter
public abstract class JavaBaseEntity<T extends JavaBaseEntity<?>> extends Model<T>  {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    @CreatedDate
    private Date createTime;
    @LastModifiedDate
    private Date updateTime;
}
